﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CodexOmegaClassLibrary.Utils
{
    public class DataUtils
    {
        public static int getNumericID(string id)
        {
            int numericID = -1;

            if (!String.IsNullOrEmpty(id))
            {
                try
                {
                    numericID = Convert.ToInt32(id);
                }
                catch (System.FormatException ex)
                {
                    numericID = -1;
                }
            }

            // return
            return numericID;
        }
    }
}
